const mongoose = require('mongoose')

mongoose.connect('mongodb://81.70.48.45:27017/test')

const conn = mongoose.connection
conn.on('open', (req, res) => {
    console.log('数据库连接成功');
})
conn.on('error', (err, req, res) => {
    console.log('数据库连接失败：原因是', err);
})

module.exports = mongoose